package com.liuyucheng.designpattern.单例模式;

/**
 * 饿汉式
 * 线程安全的
 */
public class Singleton1 {
    private static Singleton1 singleton = new Singleton1();

    //返回静态资源中Singleton实例
    public static Singleton1 getInstance() {
        return singleton;
    }
}
